#!/bin/bash
windowsList=$(wmctrl -l -G -p -x)
result="${windowsList}"
while read -r line
do
    id=''
    index=0
    name='null'
    title='null'
    for i in ${line[@]}
    do
  if [ $index == 0 ]
  then
      id=$i
  fi
  if [ $index == 7 ]
  then
      name=$i
  fi
  if [ $index == 9 ]
  then
      title=$i;
  fi
  index=$((index + 1))
    done
    if [ $name == 'wechat.exe.Wine' ]
    then
  if [ $title != '微信' ]
  then
      echo 'id is '$id 'name is '$name 'title is '$title
      xdotool windowunmap $id
  fi
    fi
done <<< "$result"
